import { defineStore } from 'pinia';

import appSettings from '@/fierce/config/app';

export interface AppSettingsState {
  /**
   * 导航模式
   */
  navMode: 'vertical' | 'horizontal' | 'horizontal-mix';
  /**
   * 导航风格
   */
  navTheme: 'dark' | 'light' | 'header-dark';
  /**
   * 顶部设置
   */
  headerSettings: HeaderSettings;
  /**
   * 页脚
   */
  showFooter: boolean;
  /**
   * 菜单
   */
  menuSettings: MenuSettings;
  /**
   * 多标签
   */
  tabsViewSettings: TabsViewSettings;
  /**
   * 面包屑
   */
  crumbsSettings: CrumbsSettings;
  /**
   * 是否开启路由动画
   */
  pageAnimation: boolean;
  /**
   * 路由动画类型
   */
  pageAnimationType: string;
  /**
   * 是否处于移动端模式
   */
  isMobile: boolean;
  /**
   * UI大小
   */
  size: 'small' | 'medium' | 'large';
}

export const useAppSettingsStore = defineStore({
  id: 'app-settings',
  state: (): AppSettingsState => {
    return {
      ...appSettings,
    };
  },
});
